<?php

// [ 会员投资喜好 ]

namespace app\common\validate;
use think\Validate;

class MemberLike extends Validate
{
    // 验证规则
    protected $rule = [
        'round'       => 'require|length:2,400',
        'industry'    => 'require|length:2,400',
        'city'        => 'require|length:2,400',
        'begin_money' => 'require|integer|max:6',
        'end_money'   => 'require|integer|max:6',
    ];

    // 错误提示
    protected $message = [
        'round.require'       => '投资轮次必须',
        'round.length'        => '投资轮次长度[2~400]',
        
        'industry.require'    => '投资行业必须',
        'industry.length'     => '投资行业长度[2~400]',
        
        'city.require'        => '关注城市必须',
        'city.length'         => '关注城市长度[2~400]',
        
        'begin_money.require' => '投资启端金额必须',
        'begin_money.integer' => '投资启端金额必须为数字',
        'begin_money.max'     => '投资启端金额最大长度[6]',
        
        'end_money.require'   => '投资末端金额必须',
        'end_money.integer'   => '投资末端金额必须为数字',
        'end_money.max'       => '投资末端金额最大长度[6]',
    ];
    
    // 验证场景
    protected $scene = [
        // 完善投资喜好
        'complete' => ['round','industry','city','begin_money','end_money'],
    ];
}